﻿@model DiplomaWeb.Models.CompaniesAndLecturers.LecturerPracticeListViewModel

<script type="text/javascript" language="javascript">
    function AddLecturerInPractice() {
        var path = '@Url.RouteUrl("Default", new {controller = "SystemManagers", action = "AddLecturer"})';
        var lecturerId = $("#addLecturerInPractice").val();
        $.ajax({
            url: path,
            type: "POST",
            async: false,
            data: ({ lecturerId: lecturerId }),
            success: function () {
                LoadLecturerPracticeList();
            }
        });
    }
</script>
        
@Html.DisplayForModel()

@Html.DropDownList("addLecturerInPractice", Model.SelectListLecturers, new { id = "addLecturerInPractice" })
<input type="button" value="Add" onclick="AddLecturerInPractice(); return false;"/>